export default [
  {
    name: "home",
    path: "/home",
    component: () => import("../pages/Home"),
  },
  {
    name: "category",
    path: "/category",
    component: () => import("../pages/Category"),
  },
  {
    name: "detail",
    // :id可以直接将id拼接在路由后面也可以进行跳转，否则只能用params或者query参数
    path: "/detail",
    component: () => import("../pages/Detail"),
  },
  {
    name: "cart",
    path: "/cart",
    component: () => import("../pages/Cart"),
  },
  {
    name: "login",
    path: "/login",
    component: () => import("../pages/Login"),
  },
  {
    name: "order",
    path: "/order",
    component: () => import("../pages/Order"),
  },
  {
    name: "search",
    path: "/search",
    component: () => import("../pages/Search"),
  },
  {
    path: "/",
    redirect: "/home",
  },
]
